<h2>Service Product Details</h2>

<?php
    $this->headTitle('Service Product Details');
    $this->headScript()->appendFile('/js/BizSense/Crud.js'); 
    $serviceItemRecord = $this->serviceItemRecord;
    $serviceItemId = $this->escape($this->serviceItemId);
    $acl = $this->acl;    
?>

<?php if ($acl->isAllowed($this->currentUser, 'access service pages')): ?>
<a href="<?php echo $this->url(
    array(
        'module' => 'default',
        'controller' => 'serviceproduct',
        'action' => 'index',
    ), null, true); ?>">Service Products</a> |
<?php endif; ?>

<?php if ($acl->isAllowed($this->currentUser, 'create service items')): ?>
<a href="<?php echo $this->url(
    array(
        'module' => 'default',
        'controller' => 'serviceproduct',
        'action' => 'create',
    ), null, true); ?>">Create</a> |
<?php endif; ?>

<?php if ($acl->isAllowed($this->currentUser, 'edit service items')): ?>
<a href="<?php echo $this->url(array(
        'module' => 'default',
        'controller' => 'serviceproduct',
        'action' => 'edit',
        'service_item_id' => $serviceItemId,
    ), null, true); ?>">Edit</a> |
<?php endif; ?>

<?php if ($acl->isAllowed($this->currentUser, 'edit service items')): 
    $deleteUrl = $this->url(
                    array(
                        'module' => 'default',
                        'controller' => 'serviceproduct',
                        'action' => 'delete',
                        'service_item_id' =>$this->escape($serviceItemId)
                    )
                );
                echo $this->deleteButton($deleteUrl); 
 endif; ?>
|

<table class="data_table">
    <tr>
        <td>Name</td>
        <td class="mediumshort">
            <?php echo $this->escape($serviceItemRecord['name']); ?>
        </td>
    </tr>
	<tr>
        <td>Description</td>
        <td>
          <?php echo $this->escape($serviceItemRecord['description']); ?>
        </td>
    </tr>
    <tr>
        <td>Amount</td>
        <td>
          <?php echo $this->escape($serviceItemRecord['amount']); ?>
        </td>
    </tr>
    <tr>
        <td>Active</td>
        <td>
          <?php 
               if ($serviceItemRecord['active']) {
                   echo "active";
               }
               else {
                   echo "deactive";
               }
            ?>
        </td>
    </tr>
    
    <tr>
        <td>Tax Type</td>
        <td><?php 
                echo $this->escape(
                         $this->taxNameById($serviceItemRecord['tax_type_id'])); 
            ?>
        </td>
    </tr>
</table>

